Skip to content

chore: remove unnecessary import statements#4

Merged
kim-em merged 8 commits intoleanprover:mainfrom
kim-em:cursor/remove-unnecessary-import-statements-1b0f
Jul 2, 2025
Merged

chore: remove unnecessary import statements#4
kim-em merged 8 commits intoleanprover:mainfrom
kim-em:cursor/remove-unnecessary-import-statements-1b0f

Conversation

@kim-em
Copy link
Copy Markdown
Collaborator

@kim-em kim-em commented Jul 2, 2025

Remove unnecessary import statements to optimize Lean file dependencies.

(This PR was prepared by a "background cursor agent", mostly for the sake of trying that out. Let's see how it did.)

cursoragent and others added 4 commits July 2, 2025 04:15
Co-authored-by: kim <kim@tqft.net>
Co-authored-by: kim <kim@tqft.net>
Co-authored-by: kim <kim@tqft.net>
Co-authored-by: kim <kim@tqft.net>
@kim-em
Copy link
Copy Markdown
Collaborator Author

kim-em commented Jul 2, 2025

Prompts were:

Go through each Lean file, and check if any import statements can be removed, preserving the success of lake build.

Yeah, you didn't do a thorough job, as I can see import Init.Data.List.Basic in Constprop is still removable. Don't tell me you're done until you've checked every remaining import can not be removed without creating an error.

Still not quite there, I don't believe import Init.WF can be essential.

Woah, your response to me pointing out a mistake should not be to fix it and conclude you're done, but to assume that there are many more mistakes.

So not that great overall. Notable is that the agent did go off and install elan on its own initiative, and all the build work happened on Cursor's machines.

@kim-em kim-em merged commit 462e35b into leanprover:main Jul 2, 2025
1 check passed
kim-em added a commit that referenced this pull request Jul 2, 2025
* Remove unnecessary imports from multiple Lean files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants